 /* 
 * File:   cAbstractAnimatedObject.h
 * Author: josep
 *
 * Created on 4 / gener / 2011, 18:22
 */

#ifndef CABSTRACTANIMATEDOBJECT_H
#define	CABSTRACTANIMATEDOBJECT_H

#include "Globals.h"
#include "cTexture.h"

class cAbstractAnimatedObject {
public:
    cAbstractAnimatedObject();
    cAbstractAnimatedObject(const cAbstractAnimatedObject& orig);
    virtual ~cAbstractAnimatedObject();

    int GetFrameState() ;
    void SetFrameState(int State);
    vector<vector<vector<int> > >* GetImageSequencesVector();
    void SetTimePerFrame(long timePerFrame);
    void SetNextTime(long nextTime);
    void SetNFrameStates(int nFrameStates);
    void SetNTilesVer(int nTilesVer);
    void SetNTilesHor(int nTilesHor);
    void SetFrameSeq(int frameSeq);
    void SetFrameRate(int frameRate);
    int GetFrameSeq() const;

protected:
    vector< vector< vector<int> > > imageSequencesVector;
    void Draw(int PosX, int PosY, cTexture* Texture,
                                        int TextureWidth,  int TextureHeight);
private:
    int frameState;
    int nTilesHor;
    int nTilesVer;
    float tileHorRatio;
    float tileVerRatio;
    int frameRate;
    int frameSeq;
    int nFrameStates;
    long nextTime;
    long timePerFrame;
};

#endif	/* CABSTRACTANIMATEDOBJECT_H */

